<div class="company">
<%= form_for @company, :html => {:novalidate => "", :multipart => true} do |f| %>
    <div class="content_middle form">
      <div class="fields_content">
        <div class="fields_content_container">
          <% if @company.errors.any? %>
              <div id="error_explanation">
                <h2><%= pluralize(@company.errors.count, "error") %> prohibited this company from being saved:</h2>
                <ul>
                  <% @company.errors.full_messages.each do |msg| %>
                      <li><%= msg %></li>
                  <% end %>
                </ul>
              </div>
          <% end %>

          <div class="fields_content_heading">
            <h2><%= t('views.clients.organization') %></h2>
          </div>


          <div class="fields_content_data">

            <div class="field_row">
              <div class="label_field left single"><span><%= t('views.companies.name') %></span></div>
              <div class="large_field">
                <%= f.text_field :company_name, :required => "required"  %>
              </div>
            </div>
            <!--field_row-->

            <div class="field_row">
              <div class="label_field left single"><span><%= t('views.clients.contact_name') %></span></div>
              <div class="medium_field">
                <%= f.text_field :contact_name, :required => "required" %>
              </div>
              <div class="label_field right single"><%= t('views.clients.contact_title') %></div>
              <div class="small_field"><%= f.text_field :contact_title %></div>
            </div>
            <!--field_row-->

            <div class="field_row">
              <div class="label_field left single"><span><%= t('views.common.email') %></span></div>
              <div class="medium_field">
                <%= f.text_field :email, :required => "required" %>
              </div>
              <div class="label_field right single"><%= t('views.common.phone') %></div>
              <div class="small_field"><%= f.text_field :phone_number %></div>
            </div>
            <!--field_row-->

            <div class="field_row">
              <div class="label_field left single"><%= t('views.common.fax') %></div>
              <div class="small_field">
                <%= f.text_field :fax_number %>
              </div>
            </div>
            <!--field_row-->

          </div>
          <!--fields_content_data-->
        </div>
        <!--fields_content_container-->
      </div>
      <!--fields_content-->


      <div class="fields_content">
        <div class="fields_content_container">
          <div id="contact" class="fields_content_heading">
            <h2><%= t('views.common.address') %> <span>(<%= t('views.common.click_to_expand') %>)</span></h2>
          </div>

          <div id="adCntcts" class="fields_content_data" style="display:none;">

            <div class="field_row description">
              <div class="label_field left single"><%= t('views.common.address') %></div>
              <div class="large_field">
                <%= f.select :country, COUNTRY_LIST, {:prompt => ""}, {"data-placeholder" => t("views.common.select_a_country"), :class => "medium chzn-select"} %>
                <ul class="field_description select">
                  <li><%= t('views.common.country') %></li>
                </ul>
              </div>
            </div>
            <!--field_row-->

            <div class="field_row description">
              <div class="label_field left single"></div>
              <div class="large_field">
                <%= f.text_field :street_address_1 %>
                <ul class="field_description">
                  <li><%= t('views.common.street') %>#1</li>
                </ul>
              </div>
            </div>
            <!--field_row-->

            <div class="field_row description">
              <div class="label_field left single">&nbsp;</div>
              <div class="large_field">
                <%= f.text_field :street_address_2 %>
                <ul class="field_description">
                  <li><%= t('views.common.street') %>>#2</li>
                </ul>
              </div>
            </div>
            <!--field_row-->

            <div class="field_row description">
              <div class="label_field left single">&nbsp;</div>
              <div class="small_field">
                <%= f.text_field :city %>
                <ul class="field_description">
                  <li><%= t('views.common.city') %></li>
                </ul>
              </div>
              <div class="small_field right">
                <%= f.text_field :province_or_state %>
                <ul class="field_description">
                  <li><%= t('views.common.province') %></li>
                </ul>
              </div>
              <div class="small_field right">
                <%= f.text_field :postal_or_zipcode %>
                <ul class="field_description">
                  <li><%= t('views.common.zip_code') %></li>
                </ul>
              </div>
            </div>
            <!--field_row-->


          </div>
          <!--fields_content_data-->
        </div>
        <!--fields_content_container-->
      </div>
      <!--fields_content-->


      <div class="fields_content">
        <div class="fields_content_container">
          <div id="detail" class="fields_content_heading">
            <h2><%= t('views.companies.branding') %> <span>(<%= t('views.common.click_to_expand') %>)</span></h2>
          </div>

          <div id="add_Detail" class="fields_content_data" style="display:none;">


            <div class="field_row custom_logo">
              <div class="label_field left single"><%= t('views.companies.logo') %></div>
              <div class="large_field">
                <input type="file" name="company[logo]" style="display:none;" id="pdffile"/>

                <div class="input-append">
                  <input type="text" name="subfile" id="subfile" class="input-xlarge"/>
                  <a class="btn" onclick="$('#pdffile').click();"><%= t('views.companies.browse') %></a>
                </div>
              </div>
            </div>
            <!--field_row-->

            <% if action_name == 'edit' %>
                <div class="field_row description">
                  <div class="label_field left single"></div>
                  <div class="large_field">
                    <%= image_tag @company.logo_url(:thumb) %>
                  </div>
                </div>
            <% end %>

            <div class="field_row">
              <div class="label_field left single"><%= t('views.companies.tag_line') %></div>
              <div class="large_field">
                <%= f.text_field :company_tag_line %>
              </div>
            </div>
            <!--field_row-->

            <div class="field_row description">
              <div class="label_field left single"><%= t('views.companies.memo') %></div>
              <div class="large_field">
                <%= f.text_area :memo %>
              </div>
            </div>

            <!--field_row-->


          </div>
          <!--fields_content_data-->
        </div>
        <!--fields_content_container-->
      </div>
      <!--fields_content-->


    </div>
    <!--content_middle-->

    <div class="content_bottom">
      <%= f.submit :class => "btn_large submit" %>
    </div>
<% end %>
</div><!--company-->